import routeComponentName from '@/config/route-component-name'

const storageRouter = [
  {
    path: '/storage',
    component: () => import('@/layout/index.vue'),
    name: 'storage',
    meta: {
      title: '仓库管理',
      icon: 'Box',
    },
    redirect: '/storage/list',
    children: [
      {
        path: 'list',
        component: () => import('@/views/storage/list/index.vue'),
        name: 'storageList',
        meta: {
          title: '仓库列表',
          keepAlive: true,
          componentName: routeComponentName.storage.storageList,
        },
      },
      {
        path: 'inven',
        component: () => import('@/views/storage/inven/index.vue'),
        name: 'Inven',
        meta: {
          title: '库存查询',
          keepAlive: true,
          componentName: routeComponentName.storage.invenList,
        },
      },
      // {
      //   path: 'intb',
      //   component: () => import('@/views/storage/intb/index.vue'),
      //   name: 'intRecord',
      //   meta: {
      //     title: '入库列表',
      //     keepAlive: true,
      //     componentName: routeComponentName.storage.inStorageList,
      //   },
      // },
      {
        path: 'inbound',
        component: () => import('@/views/storage/inbound/index.vue'),
        name: 'inboundList',
        meta: {
          title: '旧件返仓列表',
          keepAlive: true,
          componentName: routeComponentName.storage.inboundList,
        },
      },
      {
        path: 'inbound/detail/:id',
        component: () => import('@/views/storage/inbound/detail.vue'),
        name: 'inboundDetail',
        meta: {
          title: '旧件返仓详情',
          keepAlive: true,
          componentName: routeComponentName.storage.inboundDetail,
        },
        hidden: true,
      },
      // {
      //   path: 'log',
      //   component: () => import('@/views/storage/loglist/index.vue'),
      //   name: 'logList',
      //   meta: {
      //     title: '物流列表',
      //     keepAlive: true,
      //     componentName: routeComponentName.storage.logisticsList,
      //   },
      // },
      // {
      //   path: 'sale',
      //   component: () => import('@/views/storage/sale/index.vue'),
      //   name: 'Salerecord',
      //   meta: { title: '销售记录', keepAlive: true },
      // },
      {
        path: 'detail/:id',
        component: () => import('@/views/storage/list/detail/detail.vue'),
        name: 'detailStore',
        meta: {
          title: '仓库详情',
          keepAlive: true,
          componentName: routeComponentName.storage.sotrageDetail,
        },
        hidden: true,
      },
      {
        path: 'outb/detail/:id',
        component: () => import('@/views/storage/outb/detail.vue'),
        name: 'detailOutStore',
        meta: {
          title: '出库详情',
          keepAlive: true,
          componentName: routeComponentName.storage.outStorageDetail,
        },
        hidden: true,
      },
      {
        path: 'intb/detail/:id',
        component: () => import('@/views/storage/intb/detail.vue'),
        name: 'detailIntbStore',
        meta: {
          title: '入库详情',
          keepAlive: true,
          componentName: routeComponentName.storage.inStorageDetail,
        },
        hidden: true,
      },

      // 跳转页面
      {
        // 新增出库
        path: 'newout',
        component: () => import('@/views/storage/outb/new/index.vue'),
        name: 'newOut',
        meta: {
          title: '新增出库',
          keepAlive: false,
          componentName: routeComponentName.storage.outStorageCreate,
        },
        hidden: true,
      },
      {
        // 出库详情
        path: 'newout/:id',
        component: () => import('@/views/storage/outb/new/index.vue'),
        name: 'detailOut',
        meta: {
          title: '出库详情',
          keepAlive: false,
          componentName: routeComponentName.storage.outStorageCreate,
        },
        hidden: true,
      },
      {
        // 新增入库
        path: 'newin',
        component: () => import('@/views/storage/intb/new/index.vue'),
        name: 'newIn',
        meta: {
          title: '新增入库',
          keepAlive: false,
          componentName: routeComponentName.storage.inStorageCreate,
        },
        hidden: true,
      },
      {
        // 入库详情
        path: 'newin/:id',
        component: () => import('@/views/storage/intb/new/index.vue'),
        name: 'detailIn',
        meta: {
          title: '入库详情',
          keepAlive: false,
          componentName: routeComponentName.storage.inStorageCreate,
        },
        hidden: true,
      },
      {
        path: 'allot/out',
        component: () => import('@/views/storage/allot-out/list.vue'),
        name: 'WarehouseAllotOut',
        meta: {
          title: '调拨出库',
          keepAlive: true,
          componentName: routeComponentName.storage.warehouseAllotOut,
        },
      },
      {
        path: 'allot/out/create',
        component: () => import('@/views/storage/allot-out/create.vue'),
        name: 'WarehouseAllotOutCreate',
        meta: {
          title: '新增调拨出库',
          keepAlive: true,
          componentName: routeComponentName.storage.warehouseAllotOutCreate,
        },
      },
      {
        path: 'allot/out/create/:id',
        component: () => import('@/views/storage/allot-out/create.vue'),
        name: 'WarehouseAllotOutDetailByWaitCheck',
        meta: {
          title: '调拨出库详情',
          keepAlive: false,
          componentName: routeComponentName.storage.warehouseAllotOutCreate,
        },
        hidden: true,
      },
      {
        path: 'allot/out/detail/:id',
        component: () => import('@/views/storage/allot-out/detail.vue'),
        name: 'WarehouseAllotOutDetail',
        meta: {
          title: '调拨出库详情',
          keepAlive: false,
          componentName: routeComponentName.storage.warehouseAllotOutDetail,
        },
        hidden: true,
      },
      {
        path: 'material/apply/list',
        component: () => import('@/views/storage/material-apply-list/index.vue'),
        name: 'MaterialApplyList',
        meta: {
          title: '物料申请单',
          keepAlive: true,
          componentName: routeComponentName.storage.materialWarehouseOutApplyList,
        },
      },
      {
        path: 'allot/in',
        component: () => import('@/views/storage/allot-in/list.vue'),
        name: 'WarehouseAllotIn',
        meta: {
          title: '调拨入库',
          keepAlive: true,
          componentName: routeComponentName.storage.warehouseAllotIn,
        },
      },
      {
        path: 'allot/in/create',
        component: () => import('@/views/storage/allot-in/create.vue'),
        name: 'WarehouseAllotInCreate',
        meta: {
          title: '新增调拨入库',
          keepAlive: true,
          componentName: routeComponentName.storage.warehouseAllotInCreate,
        },
      },
      {
        path: 'allot/in/create/:id/:type',
        component: () => import('@/views/storage/allot-in/create.vue'),
        name: 'WarehouseAllotInDetailByWaitCheck',
        meta: {
          title: '调拨入库详情',
          keepAlive: false,
          componentName: routeComponentName.storage.warehouseAllotInCreate,
        },
        hidden: true,
      },
      {
        path: 'allot/in/detail/:id',
        component: () => import('@/views/storage/allot-in/detail.vue'),
        name: 'WarehouseAllotInDetail',
        meta: {
          title: '调拨入库详情',
          keepAlive: false,
          componentName: routeComponentName.storage.warehouseAllotInDetail,
        },
        hidden: true,
      },
      {
        path: 'outb',
        component: () => import('@/views/storage/outb/index.vue'),
        name: 'outRecord',
        meta: {
          title: '销售出库单',
          keepAlive: true,
          componentName: routeComponentName.storage.outStorageList,
        },
      },
      {
        path: 'order/material/out/list',
        component: () => import('@/views/storage/order-material-wareouse-out-list/index.vue'),
        name: 'OrderMaterialOutList',
        meta: {
          title: '工单物料出库单',
          keepAlive: true,
          componentName: routeComponentName.storage.orderMaterialWarehouseOutList,
        },
      },
    ],
  },
]

export default storageRouter
